

<%@ page import="auction.Auction" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'auction.label', default: 'Auction')}" />
        <title>Auktion anlegen</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><g:link class="list" action="list">Auktionsliste</g:link></span>
   
        </div>
	<div class="body col_11 col">
		<h1>Neue Auktion erstellen</h1>
		<g:if test="${flash.message}">
			<div class="message">
				${flash.message}
			</div>
		</g:if>
		<g:hasErrors bean="${auctionInstance}">
			<div class="errors">
				<g:renderErrors bean="${auctionInstance}" as="list" />
			</div>
		</g:hasErrors>


		<g:form action="save" enctype="multipart/form-data">
			<fieldset class="s_column">
				<div class="${hasErrors(bean: auctionInstance, field: 'heading', 'errors')}">
					<label for="heading">Titel
					</label>
					<g:textField name="heading" value="${auctionInstance?.heading}" />
				</div>
				<div class="${hasErrors(bean: auctionInstance, field: 'description', 'errors')}">
					<label for="description">Beschreibung
					</label>
					<g:textArea rows="20" name="description"
						value="${auctionInstance?.description}" />
				</div>
				<div class="${hasErrors(bean: auctionInstance, field: 'startprice', 'errors')}">
					<label for="startprice">Startpreis
					</label>
					<g:textField name="startprice" type="number"
						value="${fieldValue(bean: auctionInstance, field: 'startprice')}" />
				</div>
				<div class="${hasErrors(bean: auctionInstance, field: 'endDate', 'errors')}">
					<label for="endDate">Auktionsende</label>
					<g:datePicker name="endDate"/>
				</div>
				
				<div>
					
 					 	<label for "Datei">W&auml;hlen Sie bitte Ihr Auktionsbild:</label>
  					 	<input name="Datei" id="Datei" type="file" size="50" maxlength="5242880" accept="image">
					 	
					 	</p>

				</div>
				<div>
					<span><g:submitButton id="generalButton" name="create"
						class="save"
						value="Auktion erstellen!" />
					</span>
			</div>
			</fieldset>
		</g:form>
		<p>
		Die Auktion wird unmittelbar nach Absenden des Formulars zum Bieten freigegeben!
		</p>
	</div>

</body>
</html>
